<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"> 


<h:head>
	<title>Prosperous</title>
	<link rel="stylesheet" href="../../../resources/styles/layout.css" type="text/css"/>
	
</h:head>


<h:body>
	<h:form id="form1">
	
	<div class="wrapper row1">
	  <header id="header" class="clear">
	    <hgroup>
	      <h1><a href="index.html">Cardápio Mobile</a></h1>
	      <h2>Seu cardápio para o mundo todo </h2>
	    </hgroup>
			<fieldset class="fl_right">
		    	<p:panel style="width:300px;height:50px;right:200px;top:60px;background:#696969;border:1px solid black">  
			    	<h:outputText style="font-weight:bold;color:#FFFFE0;" value="Usuário:"/>
					<h:outputText style="font-weight:bold;color:#FFA500;" value="#{loginMB.getSessao('NomeUsuario')}"/>  
					<fieldset>		
						<h:outputText value="Acesso: " style="font-weight:bold;color:#FFFFE0;"/>  
						<h:outputText id="restaurante" style="font-weight:bold;color:#FFA500;" value="#{loginMB.getSessao('NomeFantasia')}"/>
						
						<p:spacer width="75" height="13"/>                                  

						<p:commandButton id="btnNoticia" type="button" icon="ui-iconNews" style="width:25px;height:25px;background:#696969" rendered="#{portalCardapioMB.statusPlanoVencendo}" /> 
						<p:menu overlay="true" trigger="btnNoticia" my="left top" at="left bottom" style="width:300px;height:30px"> 
								<p:menuitem value="#{portalCardapioMB.msgPlanoVencendo}" 
								style="background:#F5F5F5;color: red;font-size:13px;font-weight:bold;" />
						</p:menu>
						
					</fieldset>  
				</p:panel> 
			</fieldset>
			<fieldset>
			<p></p>
			</fieldset>
			
	    <nav class="clear">
	      <ul>

	        <li class="active"><a href="#">Minha Conta</a>
	          <ul>
	            <li><a href="portalCardapioMundo.jsf">Portal Home</a></li>
	            <li><a href="../user/meusDados.jsf">Meus Dados</a></li>
	            <li><a href="portalCardapioMundo.jsf?changeAccess=EEN013550">Trocar Acesso</a></li>
	            <li onclick="PF('dlgSair').show();"><a href="#">Sair</a></li>
	            <li><a href="#"></a></li>
	          </ul>
	        </li>

	        <li><a href="#">Acesso</a>
	          <ul>
	            <li><a href="../admin/cadUsuario.jsf">Novo Usuário</a></li>
	            <li><a href="../user/consUsuario.jsf">Consulta Usuários</a></li>
	            <li><a href="#"></a></li>
	          </ul>
	        </li>
	        
	        <li><a href="#">Restaurante</a>
	          <ul>
	            <li><a href="../admin/cadRestauranteFilial.jsf?operation=ADDFILIAL">Nova Filial</a></li>
	            <li><a href="../user/consRestaurante.jsf?operation=ALTRESTAURANTE">Consulta Restaurante</a></li>
	            <li><a href="#"></a></li>
	          </ul>
	        </li>

	        <li><a href="#">Cardápio</a>
	          <ul>
	            <li><a href="../user/cardapio/opcaoCardapios.jsf">Novo Cardápio</a></li>
	            <li><a href="../user/cardapio/consCardapios.jsf">Cardápios</a></li>
	            <li><a href="../user/cardapio/consCardapios.jsf">Agendamento</a></li>
	            <li><a href="#"></a></li>
	          </ul>
	        </li>

	        <li><a href="#">Business Intelligence</a>
	          <ul>
	            <li><a href="#">Avaliações Cardápio</a></li>
	            <li><a href="#">Avaliações Atendimento</a></li>
	            <li><a href="#">Avaliações Infraestrutura</a></li>
	            <li><a href="#">Avaliação Geral</a></li>
	            <li><a href="#"></a></li>
	          </ul>
	        </li>

	        <li><a href="#">Plano</a>
	          <ul>
	           <li><a href="../user/meuPlano.jsf">Meu Plano</a></li>
	           <li><a href="../admin/renovacao.jsf">Renovação Conta</a></li>
	           <li><a href="../user/planos.jsf">Planos</a></li>
	          </ul>
	        </li>
	      </ul>
	    </nav>
	  </header>
	</div>
    
	</h:form>  	    			
	
	
	<h:form id="form2">
	
	<div class="wrapper row2">
	    <div id="container" class="clear"> 
	    	<div id="homepage">
				<p:messages id="mensagem" for="mensagem" showDetail="true" autoUpdate="true"/>
				
				<!-- ############################ (1) FLUXO ::  ESCOLHE PLANO ALTERAÇÃO  ############################ -->
				<p:dialog id="definePlanoDialog" closable="true" header="Alteração Plano" modal="true" style="background-color:#E0EEE0" 
					height="480" width="1090" widgetVar="dlgAlteraPlano" resizable="false" showEffect="fade" hideEffect="fade" styleClass="disable-scroll" visible="true">
					
					<div align="center">							
						<p:carousel id="crlPlanos" itemStyle="width:320px;height:410px;background-color:#{plano.corPanelPlano}" 
							value="#{planoMB.planoL}" headerText="" var="plano"> 
							<h:panelGrid columns="1" width="100%" style="text-align:center" cellpadding="5" columnClasses="label,value" styleClass="ui-panelgrid">
							
								<f:facet name="header">
									<h:outputText id="notificacaoPlanoVencidoutputText" value="#{plano.nomePlano}" style="color:#B0E2FF;font-size:30px;font-weight:bold;"/>
								</f:facet>
								<div align="center">
									<br/>
									<h:outputText value="#{plano.beneficioQtdeCardapioS}" style="color:#483D8B;font-size:15px;font-weight:bold;"/>
									<h:outputText value="#{plano.beneficioQtdeFilialS}" style="color:#483D8B;font-size:15px;font-weight:bold;"/>
									<h:outputText value="#{plano.beneficioPeriodoAssinaturaS}" style="color:#483D8B;font-size:15px;font-weight:bold;"/>
									<h:outputText value="#{plano.beneficioTexto}" style="color:#483D8B;font-size:15px;font-weight:bold;"/>
									<br/>
								</div>
							</h:panelGrid>
				
				           	<div align="center">
								<h:outputText value="#{plano.moeda}" style="color:838B8B;font-weight:bold;font-size:18px;"/>
								<h:outputText value="#{plano.valor}" style="color:blue;font-size:30px;font-weight:bold;"/>
								<h:outputText value="#{plano.periodicidadeTipoFormatado}" style="color:838B8B;font-weight:bold;font-size:18px;"/>
								<br/>
								<br/>
								<br/>
								</div>

								<p:commandButton value="#{msgs.RenovarPlano}"  icon="ui-icon-addPagamento" action="#{alteracaoPlanoMB.validaOperacaoUpDowPlano()}"
								update=":form2:dialogUpDowPlano">
									<f:setPropertyActionListener value="#{plano}" target="#{alteracaoPlanoMB.selectPlanoVO}" />
								</p:commandButton>					 
						</p:carousel>
					</div>
				</p:dialog>
	
				<!-- ############################ (2) FLUXO ::   MESSAGEM UPGRADE/DOWNGRADE PLANO  ############################ -->
				<p:dialog id="dialogUpDowPlano" header="Alteração Plano" modal="true" height="85" width="510" widgetVar="dlgUpDowngradePlano" resizable="false" 
					showEffect="fade" hideEffect="fade">  
					<h:panelGrid columns="2" cellpadding="5" styleClass="ui-panelgrid">
						<p:graphicImage value="../../../resources/icones/informacao.ico" width="35" height="35" />
							#{alteracaoPlanoMB.msgUpDownGradePlano}
					</h:panelGrid>
										          
					<f:facet name="footer">  
						<p class="fl_left">
							<p:commandButton id="cancelarButton1" value="Cancelar" height="50" width="50"/>
						</p>
						<p class="fl_right">
							<p:commandButton id="continuarButton1" value="Confirma" height="50" width="50" onclick="PF('dlgUpDowngradePlano').hide();" 
								action="#{alteracaoPlanoMB.checaCreditoPagamento()}" update="form2"/>
						</p>  
					</f:facet>  
				</p:dialog>
				
				
				<!-- ############################ (3) FLUXO DOWNSIZE ::  DESATIVA RESTAURANTE/CARDAPIO ############################ -->
				<p:dialog id="dialogDownRestaurante" header="Desativa Restaurante" widgetVar="dlgDownRestaurante" resizable="false" 
					showEffect="fade" hideEffect="fade" height="210" width="610" modal="true" style="background-color:#F5F5F5; font-size:16px;">  

					<br/>
           			<h:outputText value="#{msgs.contratoAlteracaoPlanoRestaurante}" escape="false" style="font-weight:bold;color:black"/>
					<br/>
					<br/>
					
					<h:panelGrid id="gridRestaurante" columns="2" style="margin-bottom:10px" cellpadding="5" columnClasses="gridCol1With1-2Col,gridCol2With1-2Col">
				        <p:selectOneMenu id="car" value="#{alteracaoPlanoMB.restauranteSelect}">
				            <f:selectItem itemLabel="Select One" itemValue="" />
				            <f:selectItems value="#{alteracaoPlanoMB.restauranteSedeFilialL}" />
				        </p:selectOneMenu>

					</h:panelGrid>
						
										          
					<f:facet name="footer">  
						<p class="fl_left">
							<p:commandButton id="cancelarBtn" value="Cancelar" height="50" width="50"/>
						</p>
						<p class="fl_right">
							<p:commandButton id="continuar" value="Confirma" height="50" width="50" onclick="PF('dlgDownRestaurante').hide();" 
								action="#{alteracaoPlanoMB.cardapioAtivoRestauranteL()}" update="form2"/>
						</p>  
					</f:facet>  
				</p:dialog>
	

				
				
					
    		</div>
	  	</div>
	</div>

	<!-- Copyright -->
	<div class="wrapper row4">
	  <footer id="copyright" class="clear">
	    <p class="fl_left">Copyright 2014 - All Rights Reserved - <a href="#">W7VM</a></p>
	    <p class="fl_right">W7VM <a href="http://www.w7vm.com/" title="Developer Application Mobile">Developer Application Mobile</a></p>
	  </footer>
	</div>
</h:form>
</h:body>
</html>